<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/ph_update/'.$cateid)?>">

	<h3>菲律宾北京领区申请表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  
		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />
			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td colspan="5">TO BE ACCOMPLISHED IN ENGLISH必须用英文填写</td>
           
        </tr>
        <tr class="even">
            <td>Surname/姓</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>Given Name/名</td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
        </tr>
        <tr class="odd">
            <td>Middle Name/中间名</td>
            <td><input type="text" name="middlename" value="<?= @$info->middlename?>" /></td>
            <td>&nbsp;</td>
            <td>Citizenship/国籍 </td>
            <td><input type="text" name="citizenship" value="<?= @$info->citizenship?>" /></td>
        </tr>
        <tr class="even">
            <td>Occupation/职业</td>
            <td><input type="text" name="occupation" value="<?= @$info->occupation?>" /></td>
            <td>&nbsp;</td>
            <td>Since/从何时起从事该职业</td>
            <td><input type="text" name="occupation_since" value="<?= @$info->occupation_since?>" id="occupation_since" /></td>
        </tr>
        <tr class="odd">
            <td>Place of Birth/出生地点</td>
            <td><input type="text" name="birth_place" value="<?= @$info->birth_place?>" /></td>
			<td>&nbsp;</td>
			<td>Date of Birth/出生日期</td>
			<td><input type="text" name="birth" value="<?= @$info->birth?>" id="birth" /></td>
        </tr>
        <tr class="even">
          <td>Sex/性别</td>
		  <td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />Male / 男 
<input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />Female / 女</td>
		  <td>&nbsp;</td>
		  <td></td>
		  <td></td>
        </tr>
        <tr class="odd">
            <td colspan="5">Applicant’s Address/申请人住址 
              <input name="app_address" type="text" value="<?= @$info->app_address?>" style="width:500px" /><br />
			  Since/从何时起居住 <input type="text" name="app_since" value="<?= @$info->app_since?>" id="app_since" />
              Telephone/电话    <input type="text" name="app_tel" value="<?= @$info->app_tel?>" /></td>
        </tr>
        <tr class="even">
            <td>Civil Status/婚姻状况</td>
            <td colspan="4">
            <input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?>/>             Single/未婚 
            <input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?>/>             Married/ 已婚
            <input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?>/>             Widowed/ 鳏寡 
            <input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?>/>             Separated/分居
            <input type="radio" name="marital_status" value="5" <?= (@$info->marital_status==5)?'checked':''?>/>             Divorced/离异<br />
            If married, state name and address of the spouse/如已婚，填写配偶姓名及住址
			姓名<input name="spouse_name" type="text" value="<?= @$info->spouse_name?>" />
            住址<input name="spouse_address" type="text" value="<?= @$info->spouse_address?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td>Description of Passport or Travel Document<br />
              /护照或旅行证件说明</td>
            <td colspan="4">Type/证件类型 
              <input type="text" name="travel_document_type" value="<?= @$info->travel_document_type?>" /> Passport Number/护照号码 
              <input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" />
              <br />
              Valid until/有效期至 
              <input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date"/>
              <br />
              Issued by/签发地 
              <input type="text" name="travel_document_issue_place" value="<?= @$info->travel_document_issue_place?>" />  Date of Issue/签发日期 
              <input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date"/>
              <br />
              Port of Entry/入境口岸 
              <input type="text" name="entry_port" value="<?= @$info->entry_port?>" />
Purpose of Entry/入境目的
<input type="text" name="entry_purpose" value="<?= @$info->entry_purpose?>" />
<br />
Length of Stay/逗留时间 
              <input type="text" name="stay_length" value="<?= @$info->stay_length?>" /> Days/天</td>
        </tr>
        <tr class="even">
            <td colspan="5">Name and Ages of Children, if any/如有子女,填写姓名及年龄<br />
              1. 姓名年龄 
              <input type="text" name="child1" value="<?= @$info->child1?>" style="width:300px" />
              <br />
              2. 姓名年龄
              <input type="text" name="child2" value="<?= @$info->child2?>" style="width:300px" />
              <br />
Father’s Name/父亲姓名 
<input type="text" name="father_name" value="<?= @$info->father_name?>" />  
&nbsp;&nbsp;Mother’s Name/母亲姓名 
<input type="text" name="mother_name" value="<?= @$info->mother_name?>" /></td>
        </tr>
		 <tr class="odd">
            <td colspan="5">Other person travelling with the Applicant under the same Passport or Travel Document/使用同一护照或旅行证件的其他随行人员<br />
              <input name="other_person" type="text" value="<?= @$info->other_person?>" style="width:500px"/></td>
        </tr>
        <tr class="even">
            <td>Address in the Philippines<br />
              /在菲律宾的地址</td>
            <td colspan="4"><input name="ph_address" type="text" value="<?= @$info->ph_address?>" style="width:500px" /></td>
            
        </tr>		
        <tr class="odd">
            <td>Destination after the Philippines<br />
              /离开菲律宾后的目的地</td>
            <td colspan="4"><input name="ph_after" type="text" value="<?= @$info->ph_after?>" style="width:500px"/></td>
        </tr>
        <tr class="even">
            <td colspan="5">References in the Philippines/在菲律宾的联系人<br />
              1. Name/姓名 
              <input type="text" name="contacter1_name" value="<?= @$info->contacter1_name?>" /> &nbsp;&nbsp;Address/地址 
              <input name="contacter1_address" type="text" value="<?= @$info->contacter1_address?>" style="width:300px" />
              <br />
              2. Name/姓名
              <input type="text" name="contacter2_name" value="<?= @$info->contacter2_name?>" />
			&nbsp;&nbsp;Address/地址
			<input name="contacter2_address" type="text" value="<?= @$info->contacter2_address?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">Supporting documents submitted and offered for inspection of visa application/为签证申请调查所提交的附加文件<br />
              1. 
              <input name="document1" type="text" value="<?= @$info->document1?>"  /> 
              &nbsp;&nbsp;2. 
              <input name="document2" type="text" value="<?= @$info->document2?>" />
              <br />
              3.
              <input name="document3" type="text" value="<?= @$info->document3?>" />
&nbsp;&nbsp;4.
<input name="document4" type="text" value="<?= @$info->document4?>" />
<br />
5.
<input name="document5" type="text" value="<?= @$info->document5?>" />
&nbsp;&nbsp;6.
<input name="document6" type="text" value="<?= @$info->document6?>" /></td>
        </tr>
        <tr class="even">
		    <td>Where you ever refused any kind of Philippine visa  before and denied admission into or deported from  the Philippine? If yes, state circumstances/
              <br />
              您以前是否曾有任何一种菲律宾签证申请被拒签及曾被拒绝入境或驱逐出境？如有，说明情况</td>
            <td colspan="4"><textarea name="refuse_reason"><?= @$info->refuse_reason?></textarea></td>
        </tr>

        <tr class="odd">
            <td colspan="5">I understand that I may only enter the Philippines at the Port of Entry designated by the Philippine Immigration Authorities and under the condition imposed by those authorities./我理解我只能在菲律宾移民当局指定的入境口岸及规定的入境条件下入境。
              <br />
              I solemnly swear that the foregoing statement are true to the best of my knowledge./我郑重声明上述内容属实。</td>
        </tr>
        
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname:"required",
		firstname:"required",
		citizenship:"required",
		sex:"required",
		birth_place:"required",
		birth:"required",
		marital_status:"required",
		travel_document_num:"required",
		travel_document_issue_place:"required",
		travel_document_issue_date:"required",
		travel_document_valid_date:"required",
		travel_document_type:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#birth").datepicker();
	$("#app_since").datepicker();
	$("#occupation_since").datepicker();
	$("#travel_document_issue_date").datepicker();
	$("#travel_document_valid_date").datepicker();

	

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>